import simulation
import pygame
import os
import math
import json
from pygame.key import *
from pygame.locals import *
from pygame.color import *


import pymunk
import pymunk.constraints
import pymunk.pygame_util

DIR = "./datas/test/"
ORIGINAL_DIR = os.path.join(DIR, "images")
MASK_DIR     = os.path.join(DIR, "label")
JSON_PATH    = os.path.join(DIR, "envmsgs")


ORIGINAL_IMAGES = os.listdir(ORIGINAL_DIR)
MASK_IMAGES     = os.listdir(MASK_DIR)
def num_compare(name:str):
    return int(name.split(".")[0])

ORIGINAL_IMAGES.sort(key=num_compare)
MASK_IMAGES.sort(key=num_compare)

ORIGINAL_IMAGES = [os.path.join(ORIGINAL_DIR, f_name) for f_name in ORIGINAL_IMAGES]
MASK_IMAGES = [os.path.join(MASK_DIR, f_name) for f_name in MASK_IMAGES]

_flag = 0

def main():
    """注释一番"""
    for masks_file in MASK_IMAGES:
        mask = pygame.image.load(masks_file)
        mask = pygame.transform.scale(mask, (mask.get_size()[0] *2, mask.get_size()[1] * 2))
        


if __name__ == "__main__":
    main()

